﻿#include "TransmitRecord.h"

TransmitRecord::TransmitRecord()
{

}

TransmitRecord::TransmitRecord(TransmitRecord const& dataRecord_MCUCodec)
{
  deviceId=dataRecord_MCUCodec.deviceId;
  userId=dataRecord_MCUCodec.userId;
  msgId=dataRecord_MCUCodec.msgId;
  data=dataRecord_MCUCodec.data;
}

TransmitRecord::~TransmitRecord()
{

}

TransmitRecord& TransmitRecord::operator=(TransmitRecord const& dataRecord_MCUCodec)
{
  deviceId=dataRecord_MCUCodec.deviceId;
  userId=dataRecord_MCUCodec.userId;
  msgId=dataRecord_MCUCodec.msgId;
  data=dataRecord_MCUCodec.data;
  return *this;
}

uint TransmitRecord::getDeviceId()const
{
  return deviceId;
}

TransmitRecord* TransmitRecord::setDeviceId(uint deviceId)
{
  this->deviceId=deviceId;
  return this;
}

uint TransmitRecord::getUserId()const
{
  return userId;
}

TransmitRecord* TransmitRecord::setUserId(uint userId)
{
  this->userId=userId;
  return this;
}

ushort TransmitRecord::getMsgId()const
{
  return msgId;
}

TransmitRecord* TransmitRecord::setMsgId(ushort msgId)
{
  this->msgId=msgId;
  return this;
}

QByteArray TransmitRecord::getData()
{
  return data;
}

TransmitRecord* TransmitRecord::setData(const QByteArray &data)
{
  this->data=data;
  return this;
}

QTimer* TransmitRecord::getTimer()
{
  return &timer;
}
